﻿socnetwork {graphics}                                               package:unknown                                                                  R Documentation
        
                                          ~~graphicaly describe social interaçõesin function of social networks based on proximity~~

Description:

a function that generates a graphical representation of a social network among individuals, where each vertex represents an individual and the lines between vertexes indicate the social connections between individuals.
The width of the lines indicate the strength (i.e. frequency) of the connections.~~

Usage:

socnetwork()


Arguments:

 ~~socnetwork(x,...)~~ 

x: symetrical matrix

y: symetrical matrix


Details:

This function requires as imput a symetrical matrix cointaining social proximity data between dyads along rows and columns.
Rows should be labled with individual's identity (preferably abreviated), which will be plotted within the graphical window.
The function returns a graph, each point representing an individual, and their positioning in space given by inter-individual distances, the alpha-male as starting point.
The segments connecting each individual is drawn form another matrix, containing dyads (X0y0 to x1y1) and stregnth of interaction (lwd).
	


Author(s):

Camila G. Coelho
camilagaco@gmail.com

See Also:

cmdscale, plot, segments, par 


Examples:

prox<-c(0,881,238,178,142,881,0,340,269,241,238,340,0,429,124,178,269,429,0,355,142,241,124,355,0)
matx.prox<-matrix(prox,1:25,nrow=5,ncol=5)
colnames(matx.prox)<-c("A","B","C","D","E")
rownames(matx.prox)<-c("A","B","C","D","E")

x<-matx.prox[,1]
y<-matx.prox[,3]  
plot(x, y, type = "n", axes = FALSE, xlab="", ylab="", asp = 1,
     main = "redes de interações sobre a proximidade social")
text(x, y, rownames(matx.prox), cex = 1.0)

grooming<-matrix(c("A","A","A","B","C","D","D","B","C","E","E","C","E","B",0.6,2.0,0.8,0.5,1.8,1.0,2.0),ncol=3)
segments(x0=x[grooming[,1]],y0=y[grooming[,1]],x1=x[grooming[,2]],y1=y[grooming[,2]], lwd=grooming[,3])
